package com.slz3.business.module.memberManagement.memMember.steward;

import com.slz3.business.module.memberManagement.memMember.domain.MemMember;
import com.slz3.business.module.memberManagement.memMember.domain.MemMemberCondition;
import org.springframework.web.reactive.function.server.ServerRequest;
import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono;

public class MemMemberResponse {

    public static Mono<ServerResponse> add(ServerRequest req) {
        return req.bodyToMono(MemMember.class).flatMap(memMember ->
                MemMemberResController.add(req, memMember)
        );
    }

    public static Mono<ServerResponse> delete(ServerRequest req) {
        return req.bodyToMono(MemMemberCondition.class).flatMap(memMemberCondition ->
                MemMemberResController.delete(req, memMemberCondition)
        );
    }

    public static Mono<ServerResponse> modify(ServerRequest req) {
        return req.bodyToMono(MemMember.class).flatMap(memMember ->
                MemMemberResController.modify(req, memMember)
        );
    }


    public static Mono<ServerResponse> list(ServerRequest req) {
        return MemMemberResController.list(req);
    }

    public static Mono<ServerResponse> info(ServerRequest req) {
        return MemMemberResController.info(req);
    }

    public static Mono<ServerResponse> choice(ServerRequest req) {
        return MemMemberResController.choice(req);
    }

    public static Mono<ServerResponse> auditSubmit(ServerRequest req) {
        return req.bodyToMono(MemMemberCondition.class).flatMap(memMemberCondition ->
                MemMemberResController.auditSubmit(req, memMemberCondition)
        );
    }

    public static Mono<ServerResponse> audit(ServerRequest req) {
        return req.bodyToMono(MemMemberCondition.class).flatMap(memMemberCondition ->
                MemMemberResController.audit(req, memMemberCondition)
        );
    }

    public static Mono<ServerResponse> auditReject(ServerRequest req) {
        return req.bodyToMono(MemMemberCondition.class).flatMap(memMemberCondition ->
                MemMemberResController.auditReject(req, memMemberCondition)
        );
    }

    public static Mono<ServerResponse> usingEnable(ServerRequest req) {
        return req.bodyToMono(MemMemberCondition.class).flatMap(memMemberCondition ->
                MemMemberResController.usingEnable(req, memMemberCondition)
        );
    }

    public static Mono<ServerResponse> usingDisable(ServerRequest req) {
        return req.bodyToMono(MemMemberCondition.class).flatMap(memMemberCondition ->
                MemMemberResController.usingDisable(req, memMemberCondition)
        );
    }   

}
